#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "uthash.h"

#include <iso646.h>

/**
 * Definition for a binary tree node.
 */
struct TreeNode {
	int val;
	struct TreeNode* left;
	struct TreeNode* right;
};
typedef struct TreeNode tree_node, *tree_node_ptr;

bool isSymmetric(struct TreeNode* root);

bool dfs(tree_node_ptr left, tree_node_ptr right);

int main()
{
	return 0;
}

bool isSymmetric(struct TreeNode* root)
{
	if (!root) return true;
	return dfs(root->left, root->right);
}

bool dfs(tree_node_ptr left, tree_node_ptr right)
{
	if (!left && !right) return true;
	if (!left || !right) return false;
	if (left->val != right->val) return false;
	return dfs(left->left, right->right) && dfs(left->right, right->left);
}
